import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public class Reset extends BukkitRunnable {
    String name;
    @Override
    public void run() {
        Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "deop "+name);
        this.cancel();
    }

    public void open(JavaPlugin plugin,String name) {
        this.name = name;
        runTaskTimer(plugin, 1, 1);
    }

}
